import assert from 'assert';

console.log('--------- 实例1 ---------')
const obj1 = {
    a: {
        b: 1
    }
};
const obj2 = {
    a: {
        b: 1
    }
};

//如果值不相等,会抛出异常,并且停止执行后面的代码
assert.deepEqual(obj2, obj1)
console.log(22);


console.log('--------- 实例2 ---------')

//assert.doesNotMatch('I will fail', /fail/);



assert.ok(typeof '123' === 'string');

